﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;

namespace SistemasBuenosAires.Website.Controls.GetUpArrow
{
    public partial class GetUpArrow : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            RegisterScript();
        }

        protected void RegisterScript()
        {
            String script;
            var streamReader = new StreamReader(Request.PhysicalApplicationPath + "/Controls/GetUpArrow/GetUpArrow.js");
            streamReader.ReadLine();
            script = streamReader.ReadToEnd();

            var clientScript = Page.ClientScript;
            if (!clientScript.IsStartupScriptRegistered("GetUpArrowScript"))
            {
                clientScript.RegisterStartupScript(this.GetType(), "GetUpArrowScript", script, true);
            }
        }
    }
}